package com.bonc.ioc.controller;

import com.bonc.ioc.common.util.AppReply;
import com.bonc.ioc.service.FirstPageService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;

/**
 * @author wxf
 * @Title
 * @Package
 * @Description 首页 热门词汇，特色资源，资源统计
 * @date 2021/4/914:05
 */
@RestController
@RequestMapping("/first")
public class FirstPageController {

    @Resource
    private FirstPageService firstPageService;

    @GetMapping("/hotWord")
    public AppReply selectSearchHotWord(){
        return AppReply.success(firstPageService.selectSearchHotWord());
    }

    @PostMapping("/scientific")
    public AppReply scientificData(){
        return AppReply.success(firstPageService.scientificData());
    }

    @PostMapping("/getScientificData")
    public AppReply getScientificData(){
        return AppReply.success(firstPageService.getScientificData());
    }
}
